<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/yuancairuku/purchase_info/purchase_info.jsx此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/yuancairuku/purchase_info/purchase_info.jsx";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'id',
                footer: "Foots",
                cnName: '原材采购入库',
                name: 'purchase_info/purchase_info',
                url: "/purchase_info/",
                sortName: "id"
            });
            const editFormFields = ref({});
            const editFormOptions = ref([]);
            const searchFormFields = ref({"order_number":"","purchase_number":"","status":"","warehouse":"","operator":"","create_time":"","effective_person":"","effective_time":""});
            const searchFormOptions = ref([[{"title":"单号","field":"order_number","type":"text"},{"title":"采购编号","field":"purchase_number","type":"text"},{"title":"状态","field":"status","type":"text"},{"title":"仓库","field":"warehouse","type":"text"}],[{"title":"操作人","field":"operator","type":"text"},{"title":"创建时间","field":"create_time","type":"datetime"},{"title":"生效人","field":"effective_person","type":"text"},{"title":"生效时间","field":"effective_time","type":"datetime"}]]);
            const columns = ref([{field:'id',title:' ID',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'order_number',title:'单号',type:'string',width:110,align:'left',sort:true},
                       {field:'purchase_number',title:'采购编号',type:'string',width:110,align:'left'},
                       {field:'status',title:'状态',type:'string',width:110,align:'left'},
                       {field:'warehouse',title:'仓库',type:'string',width:110,align:'left'},
                       {field:'operator',title:'操作人',type:'string',width:110,align:'left'},
                       {field:'create_time',title:'创建时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'effective_person',title:'生效人',type:'string',width:110,align:'left'},
                       {field:'effective_time',title:'生效时间',type:'datetime',width:150,align:'left',sort:true},
                       {field:'remark',title:'备注',type:'string',width:180,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
